package com.san.school.controller;
import com.san.school.entity.Teacher;
import com.san.school.service.impl.TeacherServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
* (teacher)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/teacher")
public class TeacherController {
/**
* 服务对象
*/
@Resource
private TeacherServiceImpl teacherServiceImpl;

/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("selectOne")
public Teacher selectOne(Integer id) {
return teacherServiceImpl.selectByPrimaryKey(id);
}

}
